var mylayer = {
	success : function(contents){
		console.log(contents)
		layer.msg(
			contents,
			{icon:1,time:3000}
		);
	},
	successUrl : function(contents,url) {
		layer.msg(
			contents,
			{icon:1,time:3000},
			function(){
				location.href=url;
			}
		);
	},
	error : function(contents){
		layer.msg(
			contents,
			{icon:2,time:3000}
		)
	},
	alert : function(contents){
		layer.alert(
			contents,
			{icon:2}
		)
	}
}
